let path = require("path");
module.exports = {
    mode:"development",
    entry:"./src/index.js",
    output:{
        filename:"build.js",
        path:path.resolve(__dirname,"dist")
    },
    module:{
        // 添加文件打包规则 rules规则
        rules:[
            {
                test:/\.css$/i,
                use:["style-loader","css-loader"]
            },
            {
                test: /\.(png|svg|jpg|jpeg|gif)$/i,
                type: 'asset/resource',
              }
        ]
    },
    plugins:[]
}